Skip to content

Fix crash on include cursors without source file (fixes CUDA builds)#30

Open
jrhemstad wants to merge 1 commit intobkryza:mainfrom
jrhemstad:fix/null-source-file-inclusion-cursor
Open

Fix crash on include cursors without source file (fixes CUDA builds)#30
jrhemstad wants to merge 1 commit intobkryza:mainfrom
jrhemstad:fix/null-source-file-inclusion-cursor

Conversation

@jrhemstad
Copy link
Copy Markdown

fixes #29

This PR adds a check to skip include directives when clang_getFileLocation returns a null source_file handle, preventing std::string construction from null while preserving normal include graph generation.

Example of the warning log message:

=== WARNING: Cannot find source file for include text: __clang_cuda_runtime_wrapper.h

Skip inclusion directives when clang_getFileLocation returns a null source_file handle (seen for built-in CUDA headers), preventing std::string construction from null while preserving normal include graph generation.
@bkryza
Copy link
Copy Markdown
Owner

bkryza commented Mar 9, 2026

@jrhemstad Can you run make format to fix formatting and update the PR? The command requires Docker...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runtime failure with CUDA files due to built-in header

2 participants